/**
 * @file filter
 * @author liaoxuezhi@baidu.com
 */
/* eslint fecs-indent: [0, "space", 2, 2] */

import * as React from 'react';
import {
  Component,
  PropTypes
} from 'react';
import {Renderer} from '../../renderer';
import * as cx from 'classnames';
import OnExpression from '../../hoc/on-expression';


@Renderer({
  name: 'form-divider',
  desc: 'form下面的分割线',
  test: (path, config) => /(?:^|\/)form-item$/.test(path) && config.type === 'divider'
})
@OnExpression
export default class Divider extends Component {
  static propTypes = {
    className: PropTypes.string,
    type: PropTypes.string.isRequired
  };

  static defaultProps = {
    className: 'line-dashed line-lg pull-in'
  };

  render() {
    const className = this.props.className;
    return (
      <div className={cx('line', className)}></div>
    );
  }
}
